<html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="BookCreated.Books"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>圖書清單</title>
</head>
<jsp:useBean id="bookList" scope="request" type="java.util.List"></jsp:useBean>
<body background="imageSource/05.gif">
	<table border="1">
		<tr>
      <th width=150>分類</th>
      <th width=150>圖書編號</th>
      <th width=150>IBSN</th>
      <th width=200>書名</th>
      <th width=50>狀態</th>
      <th width=150>存放位置</th>
      <th width=90 nowrap>上架日期</th>
      <th width=50 nowrap>操作
      <td width=100><form method=get action=createbook>
          <div align="center">
            <input type=submit value=ADD>
          </div>
      </form></td>
    </tr>
		</tr>
		<%
			for (int i = 0; i < bookList.size(); i++) {
				Books b = (Books) bookList.get(i);
		%>
		<tr>
			<form action="editbook" method="POST">
				<input type="hidden" name="bookid" value=<%=b.getBookID()%>>
				<p>
				<td><%=b.getCALDESCRIPTION()%></td>
				<td><%=b.getBookID()%></td>
				<td><%=b.getISBN()%></td>
				<td><%=b.getBOOKNAME()%></td>
				<td><%=b.getSTATUS()%></td>
				<td><%=b.getLOCATION()%></td>
				<td><%=b.getCREATEDATE()%></td>
				<td><input type="submit" value="edit"></td>
			</form>
			<form action="delbook" method="Get">
				<input type="hidden" name="bookid" value=<%=b.getBookID()%>>
				<p>
				<td><input type="submit" value="Delete"></td>
			</form>
		</tr>
		<%
			}
		%>
	</table>
	<br>
	<input type=button onClick="location.href='inputdata.jsp'" value='返回選單'>
</body>
</html>